home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / tweak16b.zip / TESTPAT.HPP < prev    next >
C/C++ Source or Header  |  1993-08-04  |  996b  |  38 lines

  1. /*
  2.     TestPat.hpp version 1.0
  3.     by Robert Schmidt of Ztiff Zox Softwear 1993
  4.  
  5.     Declares the TestPatterns class which is further defined in
  6.         TestPat.cpp.
  7. */
  8.  
  9. #ifndef _TestPat_HPP
  10. #define _TestPat_HPP
  11.  
  12. #include <stdlib.h>
  13. #include "RegTable.HPP"
  14.  
  15. class TestPatterns
  16.     {
  17. public:
  18.     // testType declares the possible types of screen patterns to test your
  19.     //    wonderful modes with.  Note that 'tests' is there just to provide a
  20.     //    constant equaling the number of tests.
  21.     enum testType
  22.         { autoDetect, testText16, testText8, test4x16, test1x256,
  23.           test4x256, tests };
  24. private:
  25.     static char *string[tests];
  26.     testType testNo;
  27. public:
  28.     TestPatterns(testType t=autoDetect) { testNo = t; }
  29.     testType operator++()    { if (++testNo==tests) testNo=testType(0);
  30.                               return testNo; }
  31.     testType operator--()    { if (--testNo<testType(0)) testNo=tests-1;
  32.                               return testNo; }
  33.     testType getTest()        { return testNo; }
  34.     void run(RegisterTable &);
  35.     void tellTest();
  36.     };
  37.  
  38. #endif